/**
 * 
 */


// ajax

$.ajax({
        url: "/inbox/newresults",
        async: true,
        dataType: 'json',
        data: data,
        timeout: 3000,
        success: function(json) {      
        		
        	if(json == null || json.currenttime == undefined){
        			return;
        	}
        }
});


// bind an event handler with a submit button

$('.custom_chart_button').live('click',function(evt){
	evt.preventDefault();
	
	if($(this).attr('name')=='save'){
		var series = new Array();
		// for each serie_option_set
		$('.serie_optionset').each(
				function(index){
			       series.push(customGraph.packOptionSet(this));
		});
		
		$("input[name='series']").attr("value", JSON.stringify(series));
		$(this).closest("form").submit();
	}
	else{
		//if($(this).attr('id')=='show_dialog'){
		//	$('.remove_results').attr('checked', true);
		//	$('#confirm_dialog').click();
		//}
	}
});